package design.builder;

import java.util.ArrayList;
import java.util.List;

/**
 * \* User: Administrator
 * <p>
 * \* Date: 2020/9/21
 * <p>
 * \* Time: 15:59
 * <p>
 * \* Description:
 * \
 */
public class Client {
    public static void main(String[] args) {
        List<String> sequence = new ArrayList<>();
        sequence.add("start");
        sequence.add("engineBoom");
        sequence.add("stop");
        BenzBuilder benzBuilder = new BenzBuilder();
        benzBuilder.setSequence(sequence);
        BenzModel carModel = (BenzModel) benzBuilder.getCarModel();
        carModel.run();

        BMWBuilder bmwBuilder = new BMWBuilder();
        bmwBuilder.setSequence(sequence);
        BMWModel carModel1 = (BMWModel) bmwBuilder.getCarModel();
        carModel1.run();
    }
}
